package com.flexcodejam.vfd.command
{
	import mx.rpc.IResponder;
	import com.adobe.cairngorm.commands.Command;
	import com.adobe.cairngorm.control.CairngormEvent;
	import flash.xml.XMLNode;
	import mx.collections.ArrayCollection;
	import mx.collections.IViewCursor;
	import mx.core.Application;
	import mx.rpc.events.ResultEvent;
	import mx.rpc.http.HTTPService;
	import mx.utils.ArrayUtil;
	import com.flexcodejam.vfd.business.ScoreBoardDelegateMock;
	import com.flexcodejam.vfd.model.VFDModelLocator;

	public class GetScoreBoardCommand implements Command, IResponder {

		private var model : VFDModelLocator = VFDModelLocator.getInstance();
		
		public function execute(cgEvent:CairngormEvent) : void {
			
			var delegate:ScoreBoardDelegateMock = new ScoreBoardDelegateMock(this);
			//delegate is a mockup returning fake data	
			delegate.getScores();
		}
		
		public function result(rpcEvent:Object) : void {
			//delegate has returned data values
			trace("DELAGATE HAS RETURNED A VALUE")	    
		}
		
		public function fault( rpcEvent : Object ) : void {
			// error
			}
		}
	}